package cn.superchart.module.dev.install.controller;

import cn.superchart.common.base.BaseController;
import cn.superchart.common.base.BaseResult;
import cn.superchart.module.dev.api.pojo.ScInstallParam;
import cn.superchart.module.dev.api.ScInstallService;
import jakarta.validation.Valid;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
@RestController
@Validated
public class InstallController extends BaseController<ScInstallService> {


    @PostMapping("/sc/install/installed")
    public BaseResult<String> installed(@RequestBody @Valid ScInstallParam scInstallParam) {
        service.installed(scInstallParam);
        return BaseResult.ok();
    }


    @GetMapping("/sc/install/verify")
    public BaseResult<Boolean> verify() {
        Boolean initOk = service.verify();
        return BaseResult.result(initOk);
    }

}
